import { driver as baseDriver, type Config } from "driver.js";
import "driver.js/dist/driver.css";

export const useDriver = () => {
  const baseOptions: Config = {
    showProgress: true,
    doneBtnText: "结束",
    nextBtnText: "下一步",
    prevBtnText: "上一步",
  };

  const driver = (options: Config) => {
    const allOptions = { ...baseOptions, ...options };
    return baseDriver(allOptions);
  };

  return {
    driver,
  };
};
